package com.iplant.pdm.serviceImpl.dao.fpc;

import com.iplant.base.po.OutResult;
import com.iplant.base.utils.annotation.dao.DBBaseDAO;
import com.iplant.base.utils.sql.BaseDAO;
import com.iplant.basic.service.po.bms.BMSEmployee;
import com.iplant.pdm.service.po.fpc.FPCProductCom;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.HashMap;
import java.util.Map;

@DBBaseDAO(FPCProductCom.class)
public class FPCProductComDAO extends BaseDAO {
    private static FPCProductComDAO Instance = null;
    private static Logger logger = LoggerFactory.getLogger(FPCProductComDAO.class);

    private FPCProductComDAO() {
        super("");
        this.Init();
    }

    public static FPCProductComDAO getInstance() {
        if (Instance == null)
            Instance = new FPCProductComDAO();
        return Instance;
    }


    public FPCProductCom FPC_SelectProductCom(BMSEmployee wLoginUser, int wProductID, int wComponentType, OutResult<Integer> wErrorCode) {
        Map<String, Object> wParams = new HashMap<>();
        if (wProductID <= 0 || wComponentType <= 0)
            return new FPCProductCom();
        wParams.put("ProductID", wProductID);
        wParams.put("ComponentType", wComponentType);
        return this.SelectPO(wLoginUser, wParams, wErrorCode);
    }


}
